
#include <iostream>

/*

https://www.bilibili.com/video/BV1xM4y1G7zn?spm_id_from=333.999.0.0

*/

void test_case1() {

    int a = 100;
    ++a = 200;
    std::cout << a << std::endl;

}

void test_case2() {
    int a = 100;
    
    //can't pass the compilation
    //a++ = 200;
    std::cout << a << std::endl;
}

/* 
++/--operator from right to left

for example:
++a++ --> ++(a++)

编译器 进行断句 贪心法

左向右 找一次性，能最长的合法运算符
a+++++b —> (a++)++ + b
*/

int main() {


    std::cout << "start plusplus test" << std::endl;

    test_case1();
    test_case2();

    return 0;
}